package com.lagou;

import com.lagou.boot.ServerBoot;
import com.lagou.boot.SpringContextHolder;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author zy
 * @version 1.0
 * @date 2021/1/26 15:33
 */
@SpringBootApplication
public class NettyApplication {

    public static void main(String[] args) {
        SpringApplication.run(NettyApplication.class);
    }

    @Bean
    public void run() throws Exception {
        ServerBoot.startServer("127.0.0.1",8998);
    }

    @Bean
    public SpringContextHolder springContextHolder(){
        return new SpringContextHolder();
    }

}
